package com.ruoyi.product.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品列表对象 products
 *
 * @author jtm
 * @date 2024-12-07
 */
public class Products extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 商品id */
    private Long id;

    /** 类型id */
    @Excel(name = "类型id")
    private Long cId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String name;

    /** 描述信息 */
    @Excel(name = "描述信息")
    private String description;

    /** 当前价格 */
    @Excel(name = "当前价格")
    private Long newPrice;

    /** 过去价格 */
    @Excel(name = "过去价格")
    private Long oldPrice;

    /** 库存 */
    @Excel(name = "库存")
    private Long stock;

    /** 商品图片 */
    @Excel(name = "商品图片")
    private String image;

    /** 商品状态 */
    @Excel(name = "商品状态")
    private Long type;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;

    /** 销量 */
    @Excel(name = "销量")
    private Long saleVolum;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setcId(Long cId)
    {
        this.cId = cId;
    }

    public Long getcId()
    {
        return cId;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }
    public void setNewPrice(Long newPrice)
    {
        this.newPrice = newPrice;
    }

    public Long getNewPrice()
    {
        return newPrice;
    }
    public void setOldPrice(Long oldPrice)
    {
        this.oldPrice = oldPrice;
    }

    public Long getOldPrice()
    {
        return oldPrice;
    }
    public void setStock(Long stock)
    {
        this.stock = stock;
    }

    public Long getStock()
    {
        return stock;
    }
    public void setImage(String image)
    {
        this.image = image;
    }

    public String getImage()
    {
        return image;
    }
    public void setType(Long type)
    {
        this.type = type;
    }

    public Long getType()
    {
        return type;
    }
    public void setCreatedTime(Date createdTime)
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime()
    {
        return createdTime;
    }
    public void setUpdatedTime(Date updatedTime)
    {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime()
    {
        return updatedTime;
    }
    public void setSaleVolum(Long saleVolum)
    {
        this.saleVolum = saleVolum;
    }

    public Long getSaleVolum()
    {
        return saleVolum;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("cId", getcId())
                .append("name", getName())
                .append("description", getDescription())
                .append("newPrice", getNewPrice())
                .append("oldPrice", getOldPrice())
                .append("stock", getStock())
                .append("image", getImage())
                .append("type", getType())
                .append("createdTime", getCreatedTime())
                .append("updatedTime", getUpdatedTime())
                .append("saleVolum", getSaleVolum())
                .toString();
    }
}
